package pl.com.like.sequoia.web.service.utils;

import java.io.Serializable;

import org.springframework.util.Assert;

public class SearchUtils implements Serializable {

	private static final long serialVersionUID = -4797139121799208129L;

	private static SearchUtils inst;

	public static SearchUtils getInstance() {
		if (inst == null) {
			inst = new SearchUtils();
		}
		return inst;
	}
	
	private SearchUtils() {

	}

	public String toSQLwildcards(String inputValue) {
		Assert.hasLength(inputValue);
		return inputValue.replace("*", "%").replace("?", "_");
	}
}
